home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
cld2_120.arc
/
CHILD2.DOC
< prev
next >
Wrap
Text File
|
1989-05-27
|
15KB
|
672 lines
* * *
C H I L D 2
* * *
OPUS Overlay Program EXEC
(C) 1988, 1989 Angelo Besani
AmnésiA CBCS 2:331/101 +39-331-263425
Version 1.20
* * *
CHILD2 Overlay Program EXEC (C) Angelo Besani
Table of contents
-----------------
Notice . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Why CHILD2.COM . . . . . . . . . . . . . . . . . . . . . . 3
Where CHILD2.COM can be used . . . . . . . . . . . . . . . 3
How to use CHILD2.COM . . . . . . . . . . . . . . . . . . 4
Multitasking environments . . . . . . . . . . . . . . . . 5
How to modify CHILD2.COM . . . . . . . . . . . . . . . . . 7
And to finish . . . . . . . . . . . . . . . . . . . . . . 8
Revision history . . . . . . . . . . . . . . . . . . . . . 9
Child.Com . . . . . . . . . . . . . . . . . . . . . . . . 10
CHILD2 user's manual Page 1
CHILD2 Overlay Program EXEC (C) Angelo Besani
NOTICE-NOTICE-NOTICE-NOTICE-NOTICE-NOTICE-NOTICE-NOTICE-NOTICE
CHILD2.COM uses undocumented DOS calls. It has been tested only
under dos 3.20. No guaranty is given here that CHILD2.COM will
work under other versions of MS-DOS.
CHILD2.COM, under multitasking environment, can be confused by
TSR (Terminate and Stay Resident) routines which deallocate
their copy of ms-dos environment. To reduce the possibility of
such problems, put ALL THE SET STATEMENTS in your AUTOEXEC.BAT
BEFORE running the TSR routines.
CHILD2 user's manual Page 2
CHILD2 Overlay Program EXEC (C) Angelo Besani
Why CHILD2.COM????
------------------
This program has been developed to reduce the amount of memory
required to run an external program from OPUS. Its original
purpose (and it is still used in this way) was to execute
Opus Xpress by Hector Santos from the O)utside option of the
Opus MESSAGE Menu. Normally, invoking an external program from
OPUS in the 205kBytes task (205 Kbytes is the memory size I've
found necessary for OPUS to work properly) only about 110kbytes
are available to the external program. CHILD2.COM, by writing to
disk the OPUS code not required by the external program itself,
will reduce the resident portion of OPUS to 2.6Kbytes thus
giving nearly the whole memory to the external program. When the
external program exits, CHILD2.COM will read the overlay files
created, restore the original code and go back to OPUS.
Where CHILD2.COM can be used
----------------------------
CHILD2.COM can be used in OPUS ONLY FROM THOSE PARTICULAR
OPTIONS which *DON'T* load first COMMAND.COM and then the
external program. So CHILD2.COM *CAN'T* be used, for example,
in the ^OC embedded command.
CHILD2 user's manual Page 3
CHILD2 Overlay Program EXEC (C) Angelo Besani
How to use CHILD2.COM
---------------------
4 easy steps are required to install CHILD2.COM:
1) Put "External program ..path..\CHILD2.COM" in the proper
place of the OPUS .CTL file and compile it.
2) Decide (and create, if it isn't already existing) the disk
and disk directory where CHILD2.COM can put the overlay
files.
3) Put in your AUTOEXEC.BAT, or whatever the starting .BAT is
called, the statement
SET CHILDTEMP=..path..
where ..path.. is the fully qualified pathname decided in
step 2. If no CHILDTEMP is SET, CHILD2.COM will write the
overlay files in the OPUS root directory.
If you have Expanded memory LIM/EMS version 3.2 or greater,
it is possible use it instead of disk files. Simply put an
asterisk ('*') just after the equal sign:
SET CHILDTEMP=*..path..
If there is not enough memory or if errors are encountered
while swapping OPUS out of conventional memory into expanded
memory, normal disk files placed in ..path.. will be used
instead of expanded memory.
4) Create, in the OPUS root directory, OPXCHILD.BAT, the batch
file executed by CHILD2.COM: on 2:331/101 OPXCHILD.BAT is
CD XPRESS
OPXPRESS -P1
CD ..
EXIT
CHILD2 user's manual Page 4
CHILD2 Overlay Program EXEC (C) Angelo Besani
Multitasking environments
-------------------------
CHILD2.COM has been fully tested under MULTILINK, DesqView 2.0
and 2.2: 2:331/101 is working from the beginning of OCTOBER 1988
and NO problems has been noticed.
No particular things must be made to use CHILD2.COM in a
multitasking environment. Only note:
1) The overlay files:
a) Specify differents paths in the CHILDTEMP environment
variable
or
b) Use the same path for all the tasks but change the overlay
names.
Please note the way that overlay filenames are created: there
are the 3 defaults name of SWAP1.OVL, SWAP2.OVL, SWAP3.OVL.
If a CHILDTEMP environment variable can be found, the
pathname is copied right BEFORE the default filenames. In
batch language the 3 filenames can be thinked as
%CHILDTEMP%SWAP1.OVL
%CHILDTEMP%SWAP2.OVL
%CHILDTEMP%SWAP3.OVL
Example of a) option:
Task 1 Task 2
CHILDTEMP=C:\OPUS\TEMP1\ CHILDTEMP=C:\OPUS\TEMP2\
(Note the final backslash)
Files created:
C:\OPUS\TEMP1\SWAP1.OVL C:\OPUS\TEMP2\SWAP1.OVL
C:\OPUS\TEMP1\SWAP2.OVL C:\OPUS\TEMP2\SWAP2.OVL
C:\OPUS\TEMP1\SWAP3.OVL C:\OPUS\TEMP2\SWAP3.OVL
Example of b) option:
Task 1 Task 2
CHILDTEMP=C:\OPUS\TEMP\1 CHILDTEMP=C:\OPUS\TEMP\2
(Note there is NOT the final backslash)
Files created:
C:\OPUS\TEMP\1SWAP1.OVL C:\OPUS\TEMP\2SWAP1.OVL
C:\OPUS\TEMP\1SWAP2.OVL C:\OPUS\TEMP\2SWAP2.OVL
C:\OPUS\TEMP\1SWAP3.OVL C:\OPUS\TEMP\2SWAP3.OVL
CHILD2 user's manual Page 5
CHILD2 Overlay Program EXEC (C) Angelo Besani
2) Command line options: if the external program must have
different command lines in different tasks, you can
successfully use environment variables. For example if you
have 2 tasks and you want to run opxpress in task 1 on COM1:
with OPX1.CTL and in task 2 on COM2: with OPX2.CTL you can
SET:
Task 1 Task 2
OPX=-p1 -copx1.ctl OPX=-p2 -copx2.ctl
and make the OPXCHILD.BAT looks like:
CD XPRESS
OPXPRESS %OPX%
CD ..
EXIT
CHILD2 user's manual Page 6
CHILD2 Overlay Program EXEC (C) Angelo Besani
How to modify CHILD2.COM
------------------------
No changes are required to use CHILD2.COM with OPXPRESS. But
someone could find CHILD2.COM useful to run other programs in
OPUS: in this case it is necessary rename CHILD2.COM to
something else and to change the name of the BATch program that
CHILD2.COM executes. The name is located at offset 0B23 hex of
CHILD2.COM (version 1.20) and it is defaulted to OPXCHILD.BAT.
You can easily change it but remember:
1) Don't change the leading '/C'
2) Don't change the following blank character
3) If it is necessary to change the LENGHT of the program name:
3a) Start writing the new program name just after the '/C'
3b) End the program name with a 'space' (0x20)
3c) Put in the byte at offset 0B20 hex of CHILD2.COM (version
1.20) the lenght of the program name plus 3.
Example. Program name: 'C:\UTILS\SOME.EXE' (17 characters
long)
Original: /COPXCHILD.BAT·
Change in: /CC:\UTILS\SOME.EXE·
And put 20 dec in byte at offset 0B20 hex.
Note: '·' indicates a 'space'
CHILD2 user's manual Page 7
CHILD2 Overlay Program EXEC (C) Angelo Besani
... and to finish...
--------------------
1) .OVL size. The amount of disk space required by the 3 overlay
files is about 130Kbytes:
SWAP1.OVL is about 129000 bytes long
SWAP2.OVL is about 110-180 bytes long (it depends on
the number of environment variable SET)
SWAP3.OVL is about 4000 bytes long
If you use Expanded Memory, CHILD2.COM will generally use 9
pages, 147456 bytes.
2) .OVL files. The SWAPx.OVL files are automatically deleted
just before re-entering OPUS; anyway if system had to be
rebooted due to an error (see below) it is likely that
SWAPx.OVL files still exist. Don't worry: the next time
CHILD2.COM will be a little slower (it has to delete the
files) but everything will work well.
3) Errors. If errors are encountered while writing one of the
three overlay files, CHILD2.COM is aborted and user will go
back in OPUS (without executing OPXCHILD.BAT); if errors are
encountered later, the system will pause 10 seconds and then
perform a short boot.
As said at page 4, if errors are found using expanded memory,
everytime it's possible normal disk files will be used in
place of expanded memory.
4) Have the 'COMSPEC' environment variable set exactly!!!
CHILD2 user's manual Page 8
CHILD2 Overlay Program EXEC (C) Angelo Besani
Revision history
----------------
Version 1.01b
Initial release.
Version 1.02
A bug has been found (and fixed): if there was less than
64kBytes of available memory under OPUS for external programs,
CHILD2 was 'forgetting' the stack in the wrong place, causing
the system to hang while re-entering OPUS. Now, if there is
sufficient memory for CHILD2 to start, everything should work
well. Anyway, don't forget that Murphy lives!
Version 1.10
Direct Expanded Memory LIM/EMS support has been added and
marginal code cleanup has been done.
Version 1.20
CHILD2.COM now passes to the BATch program the command line
parameters it gets from OPUS. Not necessary for OPXPRESS but may
be needed by other programs.
CHILD2 user's manual Page 9
CHILD2 Overlay Program EXEC (C) Angelo Besani
Child.com
---------
CHILD.COM is the "big memory" version of CHILD2. It work exactly
in the same way. The only (BIG) difference is that CHILD.COM
doesn't swap OPUS.EXE to disk or into expanded memory, but keeps
everything in conventional memory: CHILD.COM makes nothing but
simply calling COMMAND.COM. One of the possible use of CHILD.COM
is to execute a BATCH program from the O)utside option of
Message and/or File Menu. This cannot be done by calling
COMMAND.COM due to the parameters OPUS puts on the command line,
which confuse COMMAND.COM.
Version 1.10
Same as CHILD2 version 1.20: CHILD now passes the command line.
CHILD2 user's manual Page 10